{extend name='main'}

{block name="button"}
<button data-modal='{:url("addWord")}' data-title="添加词汇" class='layui-btn layui-btn-sm layui-btn-normal' >添加词汇</button>
{/block}

{block name="content"}
<style>
    pre{
        display: block;
        padding: 3px;
        margin: 5px 0;
        font-size: 12px;
        color: #ffffff;
        word-break: break-all;
        background-color: #7f8ba0;
        border: 1px solid #7f8ba0;
        border-radius: 4px;
    }
    .action-node{
        background: #1e9fff;
        color: white !important;
        padding: 3px;
        border-radius: 3px;
    }
    .my-sort{
        color: #1e9fff;
        margin-left: 8px;
        cursor: pointer;
    }
</style>
<div class="think-box-shadow table-block">

    {include file='sensitive/index_search'}

    <span>词库整合自github <a href="https://github.com/jkiss/sensitive-words" target="_blank">https://github.com/jkiss/sensitive-words</a></span>
    <span style="margin-left: 40px;cursor: pointer;text-decoration: underline"> <a style="color: #636363;" data-open='{:url("checkString")}'>敏感字符串测试</a></span>
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left'>
                ID{if $mySort eq 'asc'}
                <i data-tips-text="顺序" class="my-sort fa fa-sort-alpha-asc" aria-hidden="true"
                   onclick="window.location.href = '/admin.html#/{:sysconf(\'xpath\')}/sensitive/index.html?spm=m-100-101&sort=desc' "></i>
                {else}
                <i data-tips-text="顺序" class="my-sort fa fa-sort-numeric-desc" aria-hidden="true"
                   onclick="window.location.href = '/admin.html#/{:sysconf(\'xpath\')}/sensitive/index.html?spm=m-100-101&sort=asc' "></i>
                {/if}
            </th>
            <th class='text-left'>词汇</th>
            <th class='text-left'>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class="text-left">{$vo.no}</td>
            <td class='text-left'>{$vo.val}</td>
            <td class='text-left'>
                <a data-dbclick class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该词汇吗？"
                   data-tips-text="删除" data-action="{:url('delWord')}" data-value="word#{$vo.val}">
                    <i class="fa fa-trash" aria-hidden="true"></i>
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
        {/notempty}
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
<script>

</script>
{/block}
